{% extends "layout.html" %}

{% block content %}
    <div class="container">
    <h2>邮箱登录</h2>
    <form class="form-horizontal" method="post" action="">
        {{ form.csrf_token }}

        {# 标签导航 #}
        <ul class="nav nav-tabs">  {# 填充整个导航条：nav-justified #}
            <li role="presentation"><a href="{{ url_for('auth.index') }}">账号登录</a></li>
            <li role="presentation"><a href="{{ url_for('auth.phone') }}">手机登录</a></li>
            <li role="presentation" class="active"><a href="{{ url_for('auth.email') }}">邮箱登录</a></li>
        </ul>
        <div class="form-group"></div>
        <div class="form-group{% if form.email.errors %} has-error{% endif %}">
            {{ form.email.label(class="col-sm-2 control-label") }}
            <div class="col-sm-10">
                {{ form.email(class="form-control", placeholder="登录邮箱[2-20位]") }}
                {% for error in form.email.errors %}
                    <span class="help-block">{{ error }}</span>
                {% endfor %}
            </div>
        </div>
        <div class="form-group{% if form.password.errors %} has-error{% endif %}">
            {{ form.password.label(class="col-sm-2 control-label") }}
            <div class="col-sm-10">
                {{ form.password(class="form-control", placeholder="登录密码[6-20位]") }}
                {% for error in form.password.errors %}
                    <span class="help-block">{{ error }}</span>
                {% endfor %}
            </div>
        </div>
        <div class="form-group{% if form.remember.errors %} has-error{% endif %}">
            <div class="col-sm-offset-2 col-sm-10">
                <div class="checkbox">
                    <label>
                        {{ form.remember }} 记住登录状态
                    </label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-default btn-load" data-loading-text="登录中" autocomplete="off">登录</button> <a href="#">忘记密码?</a>
            </div>
        </div>
    </form>

    {% if SWITCH_LOGIN_THREE_PART %}
    {% include('auth/_login_three_part.html') %}
    {% endif %}

    </div>
{% endblock %}